package cn.edu.scau.cmi.wuyihan.simpleFactoryMethod;
import cn.edu.scau.cmi.wuyihan.simpleFactoryMethod.domain.Beef;
import cn.edu.scau.cmi.wuyihan.simpleFactoryMethod.domain.Chicken;
import cn.edu.scau.cmi.wuyihan.simpleFactoryMethod.domain.Meat;
import cn.edu.scau.cmi.wuyihan.simpleFactoryMethod.domain.Pork;
public class MeatFactory {
	public static Meat getMeat(String meatName) {
		Meat meat = null;
		switch (meatName) {
		case "beef":
			meat = new Beef("beef");
			break;
		case "pork":
			meat = new Pork("pork");
			break;
		case "chicken":
			meat = new Chicken("chicken");
			break;
		}	
		return meat;
	}
}
